<?php

	namespace Phptricks\app\controllers\index;

	/**
	 *  phptricks Framework 
	 *  link http://phptricks.net/Framework
	 *  date start 2014
	 */
	use Phptricks\system\library\PhptricksExceptions\PhptricksExceptions as Exc;
	use Phptricks\app\controllers\base\base as base;
	use Phptricks\system\library\session\session as session;
	use Phptricks\app\models\index\index as index_model;

	class index extends base{

		public $_session;
		public $index_model = false;

		public function __construct(){
			parent::__construct();
			session::getinstance();
		}

		public function index(){
			$this->index_model = index_model::getinstance();
			$this->index_model->get_data();

			$this->view->assign('page_title', \strip_tags($this->settings['site_description']));
			$this->view->display('index.tpl');
		}

		public function admin_index(){
			try {
				$this->view->assign('data', 'data b assign');
				$this->view->display('index.tpl');
			} catch (\Exception $exc) {
				throw new Exc($exc->getMessage());
			}
		}

		

	}
	